using System;
using System.Collections.Generic;
using System.Text;

namespace cs2335.CCT
{
    class TreeNodeCollection : ITreeNodeCollection
    {
        List<ITreeNode> nodeList;

        public TreeNodeCollection()
        {
            nodeList = new List<ITreeNode>();
        }

        #region Methods

        public ITreeNode Add(string nodeText)
        {
            ITreeNode node = new TreeNode();
            node.Text = nodeText;
            nodeList.Add(node);
            return node;
        }

        public List<ITreeNode> List
        {
            get { return nodeList; }
        }


        public void Remove(ITreeNode node)
        {
            nodeList.Remove(node);
        }

        #endregion
    }
}